package proInstMgrModule.Component;

import java.util.ArrayList;

import edu.ccut.saturn.component.DefaultComponent;
import edu.ccut.saturn.component.IParameterContext;
import edu.ccut.saturn.component.SaturnData;

public class GetCurrentActIdList extends DefaultComponent {
	@SuppressWarnings("unchecked")
	@Override
	public void execute(IParameterContext parameterContext) throws Exception {
		ArrayList<SaturnData> currentActInstList = (ArrayList<SaturnData>)parameterContext.getParameterValue(0);
		ArrayList<String> currentActIdList = null;
		if(currentActInstList!=null){
			currentActIdList = new ArrayList<String>();
			for(SaturnData actInst:currentActInstList){
				currentActIdList.add(actInst.get("activity_id")+"");
			}
		}
		
		parameterContext.setParameter(1, currentActIdList);
	 
	}
}